<h1>Admin: Initial setup</h1>
<p>
  TODO: shown to Site Owner
</p>
<ol>
  <li>Provide this callback URL to the service provider:
      <%%= link_to callback_<%= singular_name %>_url("oauth"), callback_<%= singular_name %>_url("oauth") %>
  </li>
  <li>Edit the CONFIG hash inside app/controllers/<%= plural_name %>_controller.rb
      (especially the consumer_key, consumer_secret)
  </li>
</ol>

<h1>Admin: Registered consumers</h1>
<p>
  TODO: shown to Site Owner
</p>
<table>
  <tr>
<% for attribute in attributes -%>
    <th><%= attribute.column.human_name %></th>
<% end -%>
  </tr>
  
<%% for <%= singular_name %> in @<%= plural_name %> %>
  <tr>
<% for attribute in attributes -%>
    <td><%%=h <%= singular_name %>.<%= attribute.name %> %></td>
<% end -%>
    <td><%%= link_to 'Show', <%= singular_name %>_path(<%= singular_name %>) %></td>
    <td><%%= link_to 'Edit', edit_<%= singular_name %>_path(<%= singular_name %>) %></td>
    <td><%%= link_to 'Destroy', <%= singular_name %>_path(<%= singular_name %>), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<%% end %>
</table>

<br />

<%%= link_to 'Create new OAuth setup', new_<%= singular_name %>_path %>